/*
 * @Author: 脉迈
 * @Date: 2021-09-15 11:18:38
 * @LastEditors: 脉迈
 * @LastEditTime: 2022-01-22 16:27:43
 */
import React from "react";
import { Switch, Route } from "react-router-dom";

import AuthRouter from "routers/authRouter";
import whiteRouters from "routers/whiteRouters";
import adminRouters from "routers/adminRouters";
function App() {
  return (
    <Switch>
      {whiteRouters.map(({ path, component, ...routes }) => (
        <Route key={path} path={path} component={component} {...routes} />
      ))}
      {adminRouters.map(({ path, component, ...routes }) => (
        <AuthRouter key={path} path={path} component={component} {...routes} />
      ))}
    </Switch>
  );
}

export default App;
